/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InFireNotification extends BasicModel<InFireNotification> {
  mainId?: number; // 关联的火情ID
  linkageLevel?: string; // 火情联动级别，表示火情的响应级别
  unitId?: string; // 通知的单位ID
  unitName?: string; // 通知的单位名称
  notifierCode?: string; // 通知人的唯一编码
  notifierName?: string; // 通知人姓名
  confirmed?: string; // 通知是否已被确认
  confirmTime?: string; // 通知确认的时间
  createTime?: string; // 记录的创建时间，默认为当前时间
  notifierPhone?: string; // 通知人姓名联系方式
  notifierContent?: string; // 通知内容
  moduleName?: string; // 模块名称
}

export const inFireNotificationList = (params?: InFireNotification | any) =>
  defHttp.get<InFireNotification>({ url: adminPath + '/management/inFireNotification/list', params });

export const inFireNotificationListData = (params?: InFireNotification | any) =>
  defHttp.post<Page<InFireNotification>>({ url: adminPath + '/management/inFireNotification/listData', params });

export const inFireNotificationForm = (params?: InFireNotification | any) =>
  defHttp.get<InFireNotification>({ url: adminPath + '/management/inFireNotification/form', params });

export const inFireNotificationSave = (params?: any, data?: InFireNotification | any) =>
  defHttp.postJson<InFireNotification>({ url: adminPath + '/management/inFireNotification/save', params, data });

export const inFireNotificationDelete = (params?: InFireNotification | any) =>
  defHttp.get<InFireNotification>({ url: adminPath + '/management/inFireNotification/delete', params });
